﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniFox.Components
{
    /// <summary>
    /// 自动装载特性
    /// </summary>
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
    public sealed class AutoWiredAttribute : Attribute
    {
        string _providerName;
        /// <summary>
        /// 
        /// </summary>
        public AutoWiredAttribute() : this(null)
        {

        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="providerName"></param>
        public AutoWiredAttribute(string providerName)
        {
            _providerName = providerName;
        }

        /// <summary>
        /// 获取提供者名称, 该名称决定使用指定的提供自动装载
        /// </summary>
        public string ProviderName
        {
            get { return _providerName; }
        }
    }
}
